package com.feri.gb.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
//泛型类
public class PageBean<T> {
    private int code;//状态码成功为0
    private String msg;//说明消息
    private long count;//总条数
    private List<T>data;//查询结果集
    /**
     * 生成分页对象*/
//    方法的泛型写在返回值的前面
    public static <T>PageBean bean(long count,List<T>list){
        return new PageBean(0,"0k",count,list);
    }
}
